3.5.88 \(\int \frac {\sec ^4(c+d x)}{a+b \sec (c+d x)} \, dx\) [488]

3.5.88.1 Optimal result
3.5.88.2 Mathematica [A] (verified)
3.5.88.3 Rubi [A] (verified)
3.5.88.4 Maple [A] (verified)
3.5.88.5 Fricas [B] (verification not implemented)
3.5.88.6 Sympy [F]
3.5.88.7 Maxima [F(-2)]
3.5.88.8 Giac [A] (verification not implemented)
3.5.88.9 Mupad [B] (verification not implemented)

3.5.88.1 Optimal result

Integrand size = 21, antiderivative size = 119 \[ \int \frac {\sec ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\frac {\left (2 a^2+b^2\right ) \text {arctanh}(\sin (c+d x))}{2 b^3 d}-\frac {2 a^3 \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} b^3 \sqrt {a+b} d}-\frac {a \tan (c+d x)}{b^2 d}+\frac {\sec (c+d x) \tan (c+d x)}{2 b d} \]

output
1/2*(2*a^2+b^2)*arctanh(sin(d*x+c))/b^3/d-2*a^3*arctanh((a-b)^(1/2)*tan(1/ 
2*d*x+1/2*c)/(a+b)^(1/2))/b^3/d/(a-b)^(1/2)/(a+b)^(1/2)-a*tan(d*x+c)/b^2/d 
+1/2*sec(d*x+c)*tan(d*x+c)/b/d
 
3.5.88.2 Mathematica [A] (verified)

Time = 0.99 (sec) , antiderivative size = 238, normalized size of antiderivative = 2.00 \[ \int \frac {\sec ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\frac {\frac {8 a^3 \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-4 a^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-2 b^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 a^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+2 b^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {b^2}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {b^2}{\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-4 a b \tan (c+d x)}{4 b^3 d} \]

input
Integrate[Sec[c + d*x]^4/(a + b*Sec[c + d*x]),x]
 
output
((8*a^3*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/Sqrt[a^2 - b 
^2] - 4*a^2*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - 2*b^2*Log[Cos[(c + 
d*x)/2] - Sin[(c + d*x)/2]] + 4*a^2*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2 
]] + 2*b^2*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + b^2/(Cos[(c + d*x)/2 
] - Sin[(c + d*x)/2])^2 - b^2/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^2 - 4* 
a*b*Tan[c + d*x])/(4*b^3*d)
 
3.5.88.3 Rubi [A] (verified)

Time = 0.87 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.08, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {3042, 4338, 3042, 4570, 3042, 4486, 3042, 4257, 4318, 3042, 3138, 221}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sec ^4(c+d x)}{a+b \sec (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^4}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx\)

\(\Big \downarrow \) 4338

\(\displaystyle \frac {\int \frac {\sec (c+d x) \left (-2 a \sec ^2(c+d x)+b \sec (c+d x)+a\right )}{a+b \sec (c+d x)}dx}{2 b}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (-2 a \csc \left (c+d x+\frac {\pi }{2}\right )^2+b \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{2 b}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d}\)

\(\Big \downarrow \) 4570

\(\displaystyle \frac {\frac {\int \frac {\sec (c+d x) \left (a b+\left (2 a^2+b^2\right ) \sec (c+d x)\right )}{a+b \sec (c+d x)}dx}{b}-\frac {2 a \tan (c+d x)}{b d}}{2 b}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a b+\left (2 a^2+b^2\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b}-\frac {2 a \tan (c+d x)}{b d}}{2 b}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d}\)

\(\Big \downarrow \) 4486

\(\displaystyle \frac {\frac {\frac {\left (2 a^2+b^2\right ) \int \sec (c+d x)dx}{b}-\frac {2 a^3 \int \frac {\sec (c+d x)}{a+b \sec (c+d x)}dx}{b}}{b}-\frac {2 a \tan (c+d x)}{b d}}{2 b}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\frac {\left (2 a^2+b^2\right ) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{b}-\frac {2 a^3 \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b}}{b}-\frac {2 a \tan (c+d x)}{b d}}{2 b}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {\frac {\frac {\left (2 a^2+b^2\right ) \text {arctanh}(\sin (c+d x))}{b d}-\frac {2 a^3 \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{b}}{b}-\frac {2 a \tan (c+d x)}{b d}}{2 b}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d}\)

\(\Big \downarrow \) 4318

\(\displaystyle \frac {\frac {\frac {\left (2 a^2+b^2\right ) \text {arctanh}(\sin (c+d x))}{b d}-\frac {2 a^3 \int \frac {1}{\frac {a \cos (c+d x)}{b}+1}dx}{b^2}}{b}-\frac {2 a \tan (c+d x)}{b d}}{2 b}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\frac {\left (2 a^2+b^2\right ) \text {arctanh}(\sin (c+d x))}{b d}-\frac {2 a^3 \int \frac {1}{\frac {a \sin \left (c+d x+\frac {\pi }{2}\right )}{b}+1}dx}{b^2}}{b}-\frac {2 a \tan (c+d x)}{b d}}{2 b}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d}\)

\(\Big \downarrow \) 3138

\(\displaystyle \frac {\frac {\frac {\left (2 a^2+b^2\right ) \text {arctanh}(\sin (c+d x))}{b d}-\frac {4 a^3 \int \frac {1}{\left (1-\frac {a}{b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right )+\frac {a+b}{b}}d\tan \left (\frac {1}{2} (c+d x)\right )}{b^2 d}}{b}-\frac {2 a \tan (c+d x)}{b d}}{2 b}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {\frac {\frac {\left (2 a^2+b^2\right ) \text {arctanh}(\sin (c+d x))}{b d}-\frac {4 a^3 \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b d \sqrt {a-b} \sqrt {a+b}}}{b}-\frac {2 a \tan (c+d x)}{b d}}{2 b}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d}\)

input
Int[Sec[c + d*x]^4/(a + b*Sec[c + d*x]),x]
 
output
(Sec[c + d*x]*Tan[c + d*x])/(2*b*d) + ((((2*a^2 + b^2)*ArcTanh[Sin[c + d*x 
]])/(b*d) - (4*a^3*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(S 
qrt[a - b]*b*Sqrt[a + b]*d))/b - (2*a*Tan[c + d*x])/(b*d))/(2*b)
 

3.5.88.3.1 Defintions of rubi rules used

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3138
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ 
e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d)   Subst[Int[1/(a + b + 
(a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] 
 && NeQ[a^2 - b^2, 0]
 

rule 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 

rule 4318
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo 
l] :> Simp[1/b   Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, 
f}, x] && NeQ[a^2 - b^2, 0]
 

rule 4338
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( 
a_)), x_Symbol] :> Simp[(-d^3)*Cot[e + f*x]*((d*Csc[e + f*x])^(n - 3)/(b*f* 
(n - 2))), x] + Simp[d^3/(b*(n - 2))   Int[(d*Csc[e + f*x])^(n - 3)*(Simp[a 
*(n - 3) + b*(n - 3)*Csc[e + f*x] - a*(n - 2)*Csc[e + f*x]^2, x]/(a + b*Csc 
[e + f*x])), x], x] /; FreeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0] && Gt 
Q[n, 3]
 

rule 4486
Int[(csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)))/(csc[( 
e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[B/b   Int[Csc[e + f*x], 
 x], x] + Simp[(A*b - a*B)/b   Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x 
] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 0]
 

rule 4570
Int[csc[(e_.) + (f_.)*(x_)]*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e 
_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_S 
ymbol] :> Simp[(-C)*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 2) 
)), x] + Simp[1/(b*(m + 2))   Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[ 
b*A*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Csc[e + f*x], x], x], x] /; 
 FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]
 
3.5.88.4 Maple [A] (verified)

Time = 0.58 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.61

method result size
derivativedivides \(\frac {-\frac {2 a^{3} \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b^{3} \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {1}{2 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {-2 a -b}{2 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\left (-2 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 b^{3}}-\frac {1}{2 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {-2 a -b}{2 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\left (2 a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 b^{3}}}{d}\) \(192\)
default \(\frac {-\frac {2 a^{3} \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b^{3} \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {1}{2 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {-2 a -b}{2 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\left (-2 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 b^{3}}-\frac {1}{2 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {-2 a -b}{2 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\left (2 a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 b^{3}}}{d}\) \(192\)
risch \(-\frac {i \left (b \,{\mathrm e}^{3 i \left (d x +c \right )}+2 a \,{\mathrm e}^{2 i \left (d x +c \right )}-b \,{\mathrm e}^{i \left (d x +c \right )}+2 a \right )}{d \,b^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{2}}{d \,b^{3}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d b}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{2}}{d \,b^{3}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d b}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, d \,b^{3}}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+b \sqrt {a^{2}-b^{2}}}{\sqrt {a^{2}-b^{2}}\, a}\right )}{\sqrt {a^{2}-b^{2}}\, d \,b^{3}}\) \(299\)

input
int(sec(d*x+c)^4/(a+b*sec(d*x+c)),x,method=_RETURNVERBOSE)
 
output
1/d*(-2*a^3/b^3/((a-b)*(a+b))^(1/2)*arctanh((a-b)*tan(1/2*d*x+1/2*c)/((a-b 
)*(a+b))^(1/2))+1/2/b/(tan(1/2*d*x+1/2*c)-1)^2-1/2*(-2*a-b)/b^2/(tan(1/2*d 
*x+1/2*c)-1)+1/2/b^3*(-2*a^2-b^2)*ln(tan(1/2*d*x+1/2*c)-1)-1/2/b/(tan(1/2* 
d*x+1/2*c)+1)^2-1/2*(-2*a-b)/b^2/(tan(1/2*d*x+1/2*c)+1)+1/2*(2*a^2+b^2)/b^ 
3*ln(tan(1/2*d*x+1/2*c)+1))
 
3.5.88.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 214 vs. \(2 (106) = 212\).

Time = 0.39 (sec) , antiderivative size = 485, normalized size of antiderivative = 4.08 \[ \int \frac {\sec ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\left [\frac {2 \, \sqrt {a^{2} - b^{2}} a^{3} \cos \left (d x + c\right )^{2} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + b^{2}}\right ) + {\left (2 \, a^{4} - a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (2 \, a^{4} - a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (a^{2} b^{2} - b^{4} - 2 \, {\left (a^{3} b - a b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4 \, {\left (a^{2} b^{3} - b^{5}\right )} d \cos \left (d x + c\right )^{2}}, -\frac {4 \, \sqrt {-a^{2} + b^{2}} a^{3} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}\right ) \cos \left (d x + c\right )^{2} - {\left (2 \, a^{4} - a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (2 \, a^{4} - a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (a^{2} b^{2} - b^{4} - 2 \, {\left (a^{3} b - a b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4 \, {\left (a^{2} b^{3} - b^{5}\right )} d \cos \left (d x + c\right )^{2}}\right ] \]

input
integrate(sec(d*x+c)^4/(a+b*sec(d*x+c)),x, algorithm="fricas")
 
output
[1/4*(2*sqrt(a^2 - b^2)*a^3*cos(d*x + c)^2*log((2*a*b*cos(d*x + c) - (a^2 
- 2*b^2)*cos(d*x + c)^2 - 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + 
 c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + b^2)) + (2*a 
^4 - a^2*b^2 - b^4)*cos(d*x + c)^2*log(sin(d*x + c) + 1) - (2*a^4 - a^2*b^ 
2 - b^4)*cos(d*x + c)^2*log(-sin(d*x + c) + 1) + 2*(a^2*b^2 - b^4 - 2*(a^3 
*b - a*b^3)*cos(d*x + c))*sin(d*x + c))/((a^2*b^3 - b^5)*d*cos(d*x + c)^2) 
, -1/4*(4*sqrt(-a^2 + b^2)*a^3*arctan(-sqrt(-a^2 + b^2)*(b*cos(d*x + c) + 
a)/((a^2 - b^2)*sin(d*x + c)))*cos(d*x + c)^2 - (2*a^4 - a^2*b^2 - b^4)*co 
s(d*x + c)^2*log(sin(d*x + c) + 1) + (2*a^4 - a^2*b^2 - b^4)*cos(d*x + c)^ 
2*log(-sin(d*x + c) + 1) - 2*(a^2*b^2 - b^4 - 2*(a^3*b - a*b^3)*cos(d*x + 
c))*sin(d*x + c))/((a^2*b^3 - b^5)*d*cos(d*x + c)^2)]
 
3.5.88.6 Sympy [F]

\[ \int \frac {\sec ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\int \frac {\sec ^{4}{\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \]

input
integrate(sec(d*x+c)**4/(a+b*sec(d*x+c)),x)
 
output
Integral(sec(c + d*x)**4/(a + b*sec(c + d*x)), x)
 
3.5.88.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {\sec ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\text {Exception raised: ValueError} \]

input
integrate(sec(d*x+c)^4/(a+b*sec(d*x+c)),x, algorithm="maxima")
 
output
Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f 
or more de
 
3.5.88.8 Giac [A] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.77 \[ \int \frac {\sec ^4(c+d x)}{a+b \sec (c+d x)} \, dx=-\frac {\frac {4 \, {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )} a^{3}}{\sqrt {-a^{2} + b^{2}} b^{3}} - \frac {{\left (2 \, a^{2} + b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{b^{3}} + \frac {{\left (2 \, a^{2} + b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{b^{3}} - \frac {2 \, {\left (2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2} b^{2}}}{2 \, d} \]

input
integrate(sec(d*x+c)^4/(a+b*sec(d*x+c)),x, algorithm="giac")
 
output
-1/2*(4*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan 
(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a^2 + b^2)))*a^3/(sqrt(- 
a^2 + b^2)*b^3) - (2*a^2 + b^2)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/b^3 + ( 
2*a^2 + b^2)*log(abs(tan(1/2*d*x + 1/2*c) - 1))/b^3 - 2*(2*a*tan(1/2*d*x + 
 1/2*c)^3 + b*tan(1/2*d*x + 1/2*c)^3 - 2*a*tan(1/2*d*x + 1/2*c) + b*tan(1/ 
2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^2*b^2))/d
 
3.5.88.9 Mupad [B] (verification not implemented)

Time = 14.12 (sec) , antiderivative size = 1002, normalized size of antiderivative = 8.42 \[ \int \frac {\sec ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\text {Too large to display} \]

input
int(1/(cos(c + d*x)^4*(a + b/cos(c + d*x))),x)
 
output
sin(c + d*x)/(2*b*d*(cos(2*c + 2*d*x)/2 + 1/2)) + atanh(sin(c/2 + (d*x)/2) 
/cos(c/2 + (d*x)/2))/(2*b*d*(cos(2*c + 2*d*x)/2 + 1/2)) + (a^2*atanh(sin(c 
/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/(b^3*d*(cos(2*c + 2*d*x)/2 + 1/2)) + (a 
tanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*cos(2*c + 2*d*x))/(2*b*d*(cos( 
2*c + 2*d*x)/2 + 1/2)) - (a*sin(2*c + 2*d*x))/(2*b^2*d*(cos(2*c + 2*d*x)/2 
 + 1/2)) - (a^3*atan(((8*a^6*sin(c/2 + (d*x)/2)*(a^2 - b^2) - 8*a^8*sin(c/ 
2 + (d*x)/2) + b^6*sin(c/2 + (d*x)/2)*(a^2 - b^2) + 8*a^7*b*sin(c/2 + (d*x 
)/2) - 2*a*b^5*sin(c/2 + (d*x)/2)*(a^2 - b^2) - 8*a^5*b*sin(c/2 + (d*x)/2) 
*(a^2 - b^2) + 5*a^2*b^4*sin(c/2 + (d*x)/2)*(a^2 - b^2) - 8*a^3*b^3*sin(c/ 
2 + (d*x)/2)*(a^2 - b^2) + 8*a^4*b^2*sin(c/2 + (d*x)/2)*(a^2 - b^2))*1i)/( 
b*cos(c/2 + (d*x)/2)*(a^2 - b^2)^(1/2)*(4*a^4*(a^2 - b^2) + b^4*(a^2 - b^2 
) + 2*a^5*b - 4*a^6 + 2*a^3*b^3 + 4*a^2*b^2*(a^2 - b^2) - a*b^3*(a^2 - b^2 
) - 2*a^3*b*(a^2 - b^2))))*1i)/(b^3*d*(a^2 - b^2)^(1/2)*(cos(2*c + 2*d*x)/ 
2 + 1/2)) + (a^2*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*cos(2*c + 2* 
d*x))/(b^3*d*(cos(2*c + 2*d*x)/2 + 1/2)) - (a^3*cos(2*c + 2*d*x)*atan(((8* 
a^6*sin(c/2 + (d*x)/2)*(a^2 - b^2) - 8*a^8*sin(c/2 + (d*x)/2) + b^6*sin(c/ 
2 + (d*x)/2)*(a^2 - b^2) + 8*a^7*b*sin(c/2 + (d*x)/2) - 2*a*b^5*sin(c/2 + 
(d*x)/2)*(a^2 - b^2) - 8*a^5*b*sin(c/2 + (d*x)/2)*(a^2 - b^2) + 5*a^2*b^4* 
sin(c/2 + (d*x)/2)*(a^2 - b^2) - 8*a^3*b^3*sin(c/2 + (d*x)/2)*(a^2 - b^2) 
+ 8*a^4*b^2*sin(c/2 + (d*x)/2)*(a^2 - b^2))*1i)/(b*cos(c/2 + (d*x)/2)*(...